<template>
  <div class="wrap">
    <p class="title">悬浮球</p>
    <div class="content">
      这是内容，请滚动到底
    </div>
    <fixed-ball class="bullBox" :itemWidth="100" :itemHeight="100" :bottomPos="0" :rightPos="0" @onFloatBtnClicked="ballClick">
      <img :src="imgUrl" alt="" class="bull">
    </fixed-ball>
  </div>
</template>

<script>
import { FixedBall } from '$root/components'
// import { Round } from '../../dist/tcfe-helper.js';

export default {
  name: 'el-fixedBall',
  data() {
    return {
      imgUrl:
        '//daily-academy.oss-cn-hangzhou.aliyuncs.com/hupanWeb/homepage/img/banner_1.jpg'
    }
  },
  components: {
    FixedBall
  },
  methods: {
    ballClick() {
      console.log('点击球了')
    }
  }
}
</script>

<style lang="less" scoped>
@import '~$common/funs.less';
.wrap {
  padding: 0 15px;
  .title {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin: 40px auto;
  }
  .content {
    height: 1600px;
    width: 100%;
    background: #2a8ee3;
    color: #fff;
    .-flex-layout();
    font-size: 40px;
  }
  /deep/.bullBox {
    .bull {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      // border: 1px solid #fff;
    }
  }

  .top-content {
    width: 100%;
    height: 100%;
    .-flex-layout();
    background-color: #fff;
    border-radius: 50%;
  }
}
</style>
